<?php
	header("Content-type:text/html;charset=utf-8");
	$phone = $_POST["userPhone"];
	$pwd = $_POST["userPwd"];
	$conn = mysql_connect("localhost","root","root");
	if($conn){
		mysql_select_db("jumeiyoupin");
	}
	$result = mysql_query("select * from users where userPhone = $phone AND userPwd =$pwd",$conn);
	// $result1 = mysql_query("select * from users where userPhone = $phone",$conn);
	// $result2 = mysql_query("select * from users where  userPwd =$pwd",$conn);
	if(mysql_num_rows($result)==1){
		echo "0";
	}
	#else if(mysql_num_rows($result1)==0){
	#	echo "1";
	#}
	else{
		echo "2";
	}
	mysql_close($conn);
?>